﻿# 依赖vtkm
find_package(VTKm REQUIRED QUIET)

set(target zaran)

set(headers
)

set(template_sources
)

set(host_src
application/AppFactory.cpp
parameter/Parameter.cpp
)
set(device_src
main.cpp 
application/Application.cpp
parameter/Parameter.cpp
action/Action.cpp
action/CreateMeshAction.cpp
action/CreateSystemAction.cpp
)

# 定义target
add_executable(${target} ${host_src} ${device_src} )

# 头文件引入
add_library(_compiler_flags INTERFACE)
target_include_directories(_compiler_flags INTERFACE
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/application>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/mesh>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/output>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/action>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/parameter>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/executioner>
  )


target_link_libraries(${target} PUBLIC _compiler_flags )

#加载 VTK-m 
target_link_libraries(${target} PUBLIC vtkm_cont vtkm_worklet vtkm_io vtkm_rendering)

target_link_libraries(${target} 
PRIVATE fmt::fmt
PRIVATE getpot
)




vtkm_add_target_information(${target} DROP_UNUSED_SYMBOLS MODIFY_CUDA_FLAGS DEVICE_SOURCES ${device_src})




